package edu.sdjzu.controller;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class FallbackController {

    @RequestMapping("/fallback/content")
    public ResponseEntity<Map<String, Object>> contentFallback() {
        Map<String, Object> body = new HashMap<>();
        body.put("code", 503);
        body.put("msg", "Content 服务不可用，请稍后再试");
        return ResponseEntity.status(HttpStatus.SERVICE_UNAVAILABLE).body(body);
    }
}

